-- GENERATED SPELL FOR [Azure Captain] --


function spell0_30666(pUnit, Event) --@Destroy Door Seal,n/a--
pUnit:FullCastSpellOnTarget(58040,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30666', 0, 1)
end

function spell1_30666(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(32736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30666', 5341, 1)
end

function spell2_30666(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_30666', 570, 1)
end

function spell3_30666(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_30666', 2000, 1)
end

function Sorts_30666(pUnit, Event)
local choix_sorts_30666 = math.random(0, 3)
if choix_sorts_30666 == 0 then
pUnit:RegisterEvent('spell0_30666', 1, 1)
end
if choix_sorts_30666 == 1 then
pUnit:RegisterEvent('spell1_30666', 1, 1)
end
if choix_sorts_30666 == 2 then
pUnit:RegisterEvent('spell2_30666', 1, 1)
end
if choix_sorts_30666 == 3 then
pUnit:RegisterEvent('spell3_30666', 1, 1)
end
end

function mob30666_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30666', math.random(1500, 3000), 1)
end

function mob30666_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30666_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30666_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30666, 1, 'mob30666_Action')
RegisterUnitEvent(30666, 2, 'mob30666_Leave')
RegisterUnitEvent(30666, 3, 'mob30666_Kill')
RegisterUnitEvent(30666, 4, 'mob30666_Die')
